package string.nowcoder.easy;

import java.util.Scanner;

/**
 * @author Stark
 * @description 密码强度等级
 * 题目链接：https://www.nowcoder.com/practice/52d382c2a7164767bca2064c1c9d5361?tpId=37&&tqId=21
 * 310&rp=1&ru=/activity/oj&qru=/ta/huawei/question-ranking
 * @date 2022/4/27 22:24
 **/
public class PasswordSecureLevel {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLine()) {
            String str = in.nextLine();
            int score = 0;
            int length = str.length();
            if(length >= 8)
                score += 25;
            else if(length >= 5)
                score += 10;
            else
                score += 5;
            boolean flagLowCase = false;
            boolean flagUpCase = false;
            int flagChar = 0;
            int flagNum = 0;
            for(int i = 0; i < length;i++){
                char ch = str.charAt(i);
                if(ch >= 'a' && ch <= 'z')
                    flagLowCase = true;
                if(ch >= 'A' && ch <= 'Z')
                    flagUpCase = true;
                if((ch >= (char)(0x21) && ch <= (char)(0x2f)) ||
                        (ch >= (char)(0x3A) && ch <= (char)(0x40)) ||
                        (ch >= (char)(0x5B) && ch <= (char)(0x60)) ||
                        (ch >= (char)(0x7B) && ch <= (char)(0x7E)))
                    flagChar++;
                if(ch >= '0' && ch <= '9')
                    flagNum++;
            }
            if(flagLowCase)
                score += 10;
            if(flagUpCase)
                score += 10;
            if(flagChar > 1)
                score += 25;
            else if(flagChar == 1)
                score += 10;
            if(flagNum > 1)
                score += 20;
            else if(flagChar == 1)
                score += 10;
            if(flagNum >=1 && (flagUpCase || flagLowCase)){
                score += 2;
                if(flagChar >= 1)
                    score += 1;
                if(flagUpCase && flagLowCase)
                    score += 2;
            }
            int choice = score / 10;
            switch (choice){
                case 9:{
                    System.out.println("VERY_SECURE");
                    break;
                }
                case 8:{
                    System.out.println("SECURE");
                    break;
                }
                case 7:{
                    System.out.println("VERY_STRONG");
                    break;
                }
                case 6:{
                    System.out.println("STRONG");
                    break;
                }
                case 5:{
                    System.out.println("AVERAGE");
                    break;
                }
                default:{
                    if(score >= 25)
                        System.out.println("WEAK");
                    else
                        System.out.println("VERY_WEAK");
                }
            }
        }
    }
}
